package com.example.understandvideo.service.transcode;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.*;

@Data
@XmlAccessorType(XmlAccessType.FIELD)// 映射所有的字段
@XmlRootElement(name = "h264")// XML根节点名称，此处为user
@AllArgsConstructor
@NoArgsConstructor
@XmlType(propOrder = {"profile"
        , "level"
        , "width"
        , "height"
        , "par"
        , "par_x"
        , "par_y"
        , "fr"
        , "fr_x"
        , "fr_y"
        , "interpolate"
        , "frameratesourcemode"
        , "playratemode"
        , "markid"
        , "rc"
        , "bitrate"
        , "maxbitrate"
        , "cqquantizer"
        , "transform8x8"
        , "intraprediction8x8"
        , "bufsize"
        , "buffillpct"
        , "gopsize"
        , "goptype"
        , "gopmodeid"
        , "scd"
        , "bframe"
        , "bitdepth"
        , "chromasampling"
        , "cabac"
        , "refframe"
        , "interlace"
        , "threadcount"
        , "lookheadframe"
        , "frcmode"
        , "smartborder"
        , "twopass"
        , "deviceid"
        , "qualitylevel"
        , "caequalitylevel"
        , "HdrType"
        , "itmmode"
        , "colorprimaries"
        , "luminancerange"
        , "simhd"
        , "preprocessor"})

public class CloudStreamH264 {
    @XmlAttribute// 解析节点的属性
    private Integer id;
    private String profile;
    private String level;
    private String width;
    private String height;
    private String par;
    private String par_x;
    private String par_y;
    private String fr;
    private String fr_x;
    private String fr_y;
    private String interpolate;
    private String frameratesourcemode;
    private String playratemode;
    private String markid;
    private String rc;
    private String bitrate;
    private String maxbitrate;
    private String cqquantizer;
    private String transform8x8;
    private String intraprediction8x8;
    private String bufsize;
    private String buffillpct;
    private String gopsize;
    private String goptype;
    private String gopmodeid;
    private String scd;
    private String bframe;
    private String bitdepth;
    private String chromasampling;
    private String cabac;
    private String refframe;
    private String interlace;
    private String threadcount;
    private String lookheadframe;
    private String frcmode;
    private String smartborder;
    private String twopass;
    private String deviceid;
    private String qualitylevel;
    private String caequalitylevel;
    private String HdrType;
    private String itmmode;
    private String colorprimaries;
    private String luminancerange;
    private CloudStreamH264SimHd simhd;
    private CloudStreamH264Preprocessor preprocessor;

    public static CloudStreamH264 getDefault() {
        return new CloudStreamH264(-1, "High", "-1", "720", "576", "source", "-1", "-1", "source", "-1", "-1"
                , "1", "0", "-1", "103920167", "VBR", "1000", "3000", "0", "1", "1", "375", "1000", "100", "0", "1"
                , "0", "0", "8", "420", "1", "1", "-1", "5", "20", "0", "1", "0", "0", "2", "1", "CUSTOM", "3", "1", "1",
                new CloudStreamH264SimHd("0", "2", "0", "0", "0", "0", "0", "0", "-1", "0", "0", "0", "0", "0", "3", "3", "-1"
                        , "1.0", "1.0", "1.0", "0"),
                new CloudStreamH264Preprocessor()
        );
    }
}
